<template>
  <!-- <div class="chatTitle">
    <span class="titleName">
      {{this.$store.state.currentSession.nickname?this.$store.state.currentSession.nickname:""}}
    </span>
    <el-button class="moreBtn" size="small" icon="el-icon-more"></el-button>
  </div> -->
  <div class="chat-title">
    <div  v-if="$store.state.currentList == '私聊'" class="chatTitle">
      <span class="titleName">
        {{this.$store.state.currentSession.nickname?this.$store.state.currentSession.nickname:""}}
      </span>
      <el-button class="moreBtn" size="small" icon="el-icon-more"></el-button>
    </div>

    <div v-if="$store.state.currentList == '群聊'"  class="chatTitle">
      <span class="titleName">
        {{this.$store.state.currentGroup.name ? this.$store.state.currentGroup.name : ""}}
      </span>
      <el-button class="moreBtn" size="small" icon="el-icon-more"></el-button>
    </div>

    <div v-if="$store.state.currentList == '机器人'"  class="chatTitle">
      <span class="titleName">
        机器人
      </span>
      <el-button class="moreBtn" size="small" icon="el-icon-more"></el-button>
    </div>
  </div>
</template>

<script>
  export default {
    name: "chattitle"
  }
</script>

<style scoped>
  .chatTitle{
    height: 50px;
    width: 100%;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    border-bottom: 0.5px solid #c7d2db;
  }
  .moreBtn{
    background-color: #eee;
    border: 0;
    height: 40px;
  }
  .titleName{
    margin: 10px 20px;
  }

</style>
